<%@ page language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page isELIgnored="false" %>
<%
    String path = request.getContextPath();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="pragma" content="no-cache"/>
    <meta http-equiv="cache-control" content="no-cache"/>
    <meta http-equiv="expires" content="0"/>
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"/>
    <meta http-equiv="description" content="This is my page"/>
    <link href="${pageContext.request.contextPath}/static/css/daoke.css" rel="stylesheet" type="text/css"/>

    <script language="JavaScript" type="text/javascript">
        function check2() {
            if (document.form1.userName.value == "") {
                alert("请输入账号");
                return false;
            }
            if (document.form1.password.value == "") {
                alert("请输入密码");
                return false;
            }
            document.form1.submit();
        }
    </script>

</head>

<body>

<form action="${pageContext.request.contextPath}/user/userEdit.html" name="form1" method="post">
    <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC" style="margin-top: 20px;">
        <tr style="height: 50px;">
            <td width="14%" height="30" align="center" bgcolor="#F9F9F9" style="font-size: 18px;">
                账号：
            </td>
            <td width="86%" bgcolor="#FFFFFF">
                &nbsp;
                <input readonly="readonly" type="text" name="userName" style="width: 250px;height: 35px;"
                       value="${currentUser.userName}"/>
                (账号只读)
            </td>
        </tr>
        <tr style="height: 50px;">
            <td height="30" align="center" bgcolor="#F9F9F9" style="font-size: 18px;">
                密码：
            </td>
            <td bgcolor="#FFFFFF">
                &nbsp;
                <input type="password" name="password" style="width: 250px;height: 35px;" value="${currentUser.password}"/>
            </td>
        </tr>
        <tr style="height: 50px;">
            <td height="30" align="center" bgcolor="#F9F9F9" style="font-size:18px;">
                姓名：
            </td>
            <td bgcolor="#FFFFFF">
                &nbsp;
                <input type="text" name="realName" style="width: 250px;height: 35px;"
                       value="${currentUser.realName}"/>
            </td>
        </tr>
        <tr style="height: 50px;">
            <td height="30" align="center" bgcolor="#F9F9F9" style="font-size: 18px;">
                住址：
            </td>
            <td bgcolor="#FFFFFF">
                &nbsp;
                <input type="text" name="userAddress" size="50" style="width: 250px;height: 35px;"
                       value="${currentUser.address }"/>
            </td>
        </tr>
        <tr style="height: 50px;">
            <td height="30" align="center" bgcolor="#F9F9F9" style="font-size: 18px;">
                电话：
            </td>
            <td bgcolor="#FFFFFF">
                &nbsp;
                <input type="text" name="tel" style="width: 250px;height: 35px;" value="${currentUser.tel }"/>
            </td>
        </tr>
        <tr style="height: 50px;">
            <td height="30" align="center" bgcolor="#F9F9F9" style="font-size: 18px;">
                邮箱：
            </td>
            <td bgcolor="#FFFFFF">
                &nbsp;
                <input type="text" name="email" style="width: 250px;height: 35px;" value="${currentUser.email }"/>
            </td>
        </tr>
        <tr style="height: 50px;">
            <td height="30" align="center" bgcolor="#F9F9F9">
                &nbsp;
            </td>
            <td bgcolor="#FFFFFF">
                &nbsp;
                <input type="button" value="修改" onclick="check2();" style="width: 80px;height: 30px;box-sizing: border-box; border-radius: 5px;font-size: 16px;" />
                <input type="reset" value="重置" style="width: 80px;height: 30px;box-sizing: border-box; border-radius: 5px;font-size: 16px;"/>
                <input type="hidden" name="id" value="${currentUser.id}"/>
            </td>
        </tr>
    </table>
</form>

</body>
</html>
